import request from "@/utils/request";
import { ReqGetRole, ReqAddRoleParams } from "./model";
// 获取角色列表
export const reqGetRole = (mmg_id: number) => {
  return request<any, PageResult<ReqGetRole[]>>({
    url: "/admin/scriptRoles",
    params: { mmg_id },
  });
};

// 添加角色
export const reqAddRole = (data: ReqAddRoleParams) => {
  return request({
    url: "/admin/scriptRoleCreate",
    method: "post",
    data,
  });
};

//删除角色
export const reqDelRole = (data: any) => {
  return request({
    url: "/admin/scriptRoleDelete",
    params: data,
  });
};
